Dynomotion

Group: DynoMotion Message: 12336 From: Hardy Family Date: 10/2/2015
Subject: g1 move sometimes combines consecutive blocks
Hi Tom,

We have a 5-axis G-code program where the interpreter/motion planner is combining g1 moves on consecutive blocks, even though (according to my understanding, anyway) it should not do that.

Here is the code snippet:

f600 g1 x... y... z... a... b...
g1 z...

The second block's z... is more negative than the 1st.  It so happens that the 1st block's xyza are the same (or very close to) the previous block's, so there is only a movement in the B axis for the first block.

What happens is that both blocks are combined so that the first block's z is ignored and there is a "diagonal" move.

If I change the 2nd block's g1 to a g0, then it works as expected.  Also, if I put a different feed rate on the 2nd block, it also works e.g.

f600 g1 x... y... z... a... b...
f601 g1 z...

Unfortunately, I can't give you a working snippet since I can't reproduce this using normal hard-coded coordinates.  Our program actually generates the coordinates dynamically using probing results.  Just in case it is something to do with using # variables, the subroutine we are using is included below.  The two relevant blocks are commented "move to next point" and "rapid down above material".  The o111 routine is called for each point.  M102 retrieves the probe data from the kflop.

Most of the time, it works, but out of the 13 test points that we have, 3 of them exhibit this behavior, and they are all for B-only moves.

Regards,
SJH


g21
#11=-0.2 (drill depth)
#12=300 (drill feed rate)
#14=10  (retract height above)
#16=0.5 (start above height)
#32=600 (feed rate)
#33=1  (use g1)
...

o111                    (operation 1)
m102 p0 q61             (get next point to #61..66; #66 is status)
#5020=#66               (set status code in expected variable for check)
m98 p100                (check OK probe)
f#32 g#33 x#61 y#62 z[#63+#14] a#64 b#65     (move to next point)
z[#63+#16]              (rapid down above material)
f#12 g1 z[#63+#11]      (drill it)
g0 z[#63+#14]           (retract)
m99


Group: DynoMotion Message: 12337 From: Hardy Family Date: 10/2/2015
Subject: Re: g1 move sometimes combines consecutive blocks
Slight correction: to work around the combined movement, the feed rate has to differ by at least 1%.  I guess there's some code in there which ignores small feed rate changes for the sake of expediency...

Regards,
SJH


On Fri, Oct 2, 2015 at 11:38 AM, Hardy Family <hardy.woodland.cypress@...> wrote:
Hi Tom,

We have a 5-axis G-code program where the interpreter/motion planner is combining g1 moves on consecutive blocks, even though (according to my understanding, anyway) it should not do that.

Here is the code snippet:

f600 g1 x... y... z... a... b...
g1 z...

The second block's z... is more negative than the 1st.  It so happens that the 1st block's xyza are the same (or very close to) the previous block's, so there is only a movement in the B axis for the first block.

What happens is that both blocks are combined so that the first block's z is ignored and there is a "diagonal" move.

If I change the 2nd block's g1 to a g0, then it works as expected.  Also, if I put a different feed rate on the 2nd block, it also works e.g.

f600 g1 x... y... z... a... b...
f601 g1 z...

Unfortunately, I can't give you a working snippet since I can't reproduce this using normal hard-coded coordinates.  Our program actually generates the coordinates dynamically using probing results.  Just in case it is something to do with using # variables, the subroutine we are using is included below.  The two relevant blocks are commented "move to next point" and "rapid down above material".  The o111 routine is called for each point.  M102 retrieves the probe data from the kflop.

Most of the time, it works, but out of the 13 test points that we have, 3 of them exhibit this behavior, and they are all for B-only moves.

Regards,
SJH


g21
#11=-0.2 (drill depth)
#12=300 (drill feed rate)
#14=10  (retract height above)
#16=0.5 (start above height)
#32=600 (feed rate)
#33=1  (use g1)
...

o111                    (operation 1)
m102 p0 q61             (get next point to #61..66; #66 is status)
#5020=#66               (set status code in expected variable for check)
m98 p100                (check OK probe)
f#32 g#33 x#61 y#62 z[#63+#14] a#64 b#65     (move to next point)
z[#63+#16]              (rapid down above material)
f#12 g1 z[#63+#11]      (drill it)
g0 z[#63+#14]           (retract)
m99



Group: DynoMotion Message: 12339 From: Tom Kerekes Date: 10/2/2015
Subject: Re: g1 move sometimes combines consecutive blocks
Hi SJH,

How is the B axis configured?  Degrees?  Radius?

What is your co-linear tolerance setting?

Do you know the approximate size of the B and Z moves?

Regards
TK

Group: DynoMotion Message: 12342 From: Hardy Family Date: 10/2/2015
Subject: Re: g1 move sometimes combines consecutive blocks
B axis is configured for degrees.  Radius unknown - I am not explicitly setting it so it would be whatever the default is - maybe that's what my problem is, but anyway...

Collinear tolerance is also unknown (default) (!!)

Movement of B is about 30 degrees, Z is about 10mm for the 2nd block, but the move from the first block is about 0.6mm

Regards,
SJH


On Fri, Oct 2, 2015 at 3:21 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi SJH,

How is the B axis configured?  Degrees?  Radius?

What is your co-linear tolerance setting?

Do you know the approximate size of the B and Z moves?

Regards
TK

Group: DynoMotion Message: 12343 From: Hardy Family Date: 10/2/2015
Subject: Re: g1 move sometimes combines consecutive blocks
Yeah, putting in a 0.01" radius for A and B cured it.  I just want them to move as fast as possible when pure rotary, since it's more of an indexing than a true 5-axis job.  Zero radius would be appropriate, but does it handle zero?

I also put in 0.001collinear tolerance.  Maybe that fixed it?

Regards,
SJH



On Fri, Oct 2, 2015 at 5:45 PM, Hardy Family <hardy.woodland.cypress@...> wrote:
B axis is configured for degrees.  Radius unknown - I am not explicitly setting it so it would be whatever the default is - maybe that's what my problem is, but anyway...

Collinear tolerance is also unknown (default) (!!)

Movement of B is about 30 degrees, Z is about 10mm for the 2nd block, but the move from the first block is about 0.6mm

Regards,
SJH


On Fri, Oct 2, 2015 at 3:21 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi SJH,

How is the B axis configured?  Degrees?  Radius?

What is your co-linear tolerance setting?

Do you know the approximate size of the B and Z moves?

Regards
TK

Group: DynoMotion Message: 12347 From: Tom Kerekes Date: 10/3/2015
Subject: Re: g1 move sometimes combines consecutive blocks
Hi SJH,

I don't usually argue with success but it I believe and agree that Zero Radius would be the appropriate value.

Zero radius indicates the angular axes are pure rotary.  For pure rotary axes if there is any xyz distance the motion time is computed solely based on the xyz distance at the specified feedrate in distance units/minute.  If there is not any xyz change then the motion time is based on the angular changes at the specified feedrate in degrees/minute.  With a non-zero Radius the angular axis motion is converted to a distance and combined with any xyz distance to compute the motion time. 

Here is some GCode that demonstrates the problem:

G20
G0X0B0
G1X10F100
G1X10.00001B100
G1X20
M30

With these Trajectory Planner Settings (B as pure angular axis):

Inline image

This patch for Version 4.33q should fix the bug.


Please let us know if it resolves the problem or cause any other issue.

Regards
TK